package com.yunfeisoft.business.model;

import com.yunfeisoft.common.base.BaseModel;
import com.yunfeisoft.common.sql.record.TransientField;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;

/**
* ClassName: PerceptionCommunicationEvaluation
* Description: 感知觉与沟通能力评估表
*
* @Author: Jackie liu
* Date: 2020-05-22
*/
@Entity
@Table(name="TT_PERCEPTION_COMMUNICATION_EVALUATION_")
public class PerceptionCommunicationEvaluation extends BaseModel implements Serializable {
	
	/**
     * Field serialVersionUID: 序列号
     */
    private static final long serialVersionUID = 1L;

	/**
     * 老人入住关联id
     */
	@Column
	private String elderId;

	@TransientField
	private String elderName;

	public String getElderName() {
		return elderName;
	}

	public void setElderName(String elderName) {
		this.elderName = elderName;
	}

	/**
     * 意识水平分数
     */
	@Column
	private Integer consciousnessScore;

	public String getConsciousnessScoreStr () {
		if (consciousnessScore == null) {
			return null;
		}
		return PerceptionCommunicationEvaluation.ConsciousnessScoreEnum.valueOf(consciousnessScore);
	}
	/**
     * 视力分数
     */
	@Column
	private Integer visionScore;

	public String getVisionScoreStr () {
		if (visionScore == null) {
			return null;
		}
		return PerceptionCommunicationEvaluation.VisionScoreEnum.valueOf(visionScore);
	}

	/**
     * 听力分数
     */
	@Column
	private Integer hearingScore;

	public String getHearingScoreStr () {
		if (hearingScore == null) {
			return null;
		}
		return PerceptionCommunicationEvaluation.HearingScoreEnum.valueOf(hearingScore);
	}

	/**
     * 沟通交流分数
     */
	@Column
	private Integer communicationScore;

	public String getCommunicationScoreStr () {
		if (communicationScore == null) {
			return null;
		}
		return PerceptionCommunicationEvaluation.CommunicationScoreEnum.valueOf(communicationScore);
	}

	/**
     * 感知觉与沟通能力等级
     */
	@Column
	private Integer level;

	public String getLevelStr () {
		if (level == null) {
			return null;
		}
		return PerceptionCommunicationEvaluation.CommunicationLevelEnum.valueOf(level);
	}

	public String getElderId() {
		return elderId;
	}

	public void setElderId(String elderId) {
		this.elderId = elderId;
	}

	public Integer getConsciousnessScore() {
		return consciousnessScore;
	}

	public void setConsciousnessScore(Integer consciousnessScore) {
		this.consciousnessScore = consciousnessScore;
	}

	public Integer getVisionScore() {
		return visionScore;
	}

	public void setVisionScore(Integer visionScore) {
		this.visionScore = visionScore;
	}

	public Integer getHearingScore() {
		return hearingScore;
	}

	public void setHearingScore(Integer hearingScore) {
		this.hearingScore = hearingScore;
	}

	public Integer getCommunicationScore() {
		return communicationScore;
	}

	public void setCommunicationScore(Integer communicationScore) {
		this.communicationScore = communicationScore;
	}

	public Integer getLevel() {
		return level;
	}

	public void setLevel(Integer level) {
		this.level = level;
	}


	// 意识情况枚举类
	public enum ConsciousnessScoreEnum {

		WAKE_UP(0, "神志清醒,对周围环境警觉"),
		SLEEPINESS(1, "嗜睡,表现为睡眠状态过度延长"),
		SLEEPING(2, "昏睡,一般的外界刺激不能使其觉醒"),
		COM_COMA(3, "昏迷,处于浅昏迷时对疼痛刺激有回避和痛苦表情");
		private int value;
		private String label;

		private ConsciousnessScoreEnum(int value, String label) {
			this.value = value;
			this.label = label;
		}

		public static String valueOf(Integer value) {
			if (value == null) {
				return null;
			}
			PerceptionCommunicationEvaluation.ConsciousnessScoreEnum[] values = PerceptionCommunicationEvaluation.ConsciousnessScoreEnum.values();
			for (PerceptionCommunicationEvaluation.ConsciousnessScoreEnum loop : values) {
				if (value == loop.getValue()) {
					return loop.getLabel();
				}
			}
			return null;
		}

		public Integer getValue() {
			return value;
		}

		public String getLabel() {
			return label;
		}
	}

	// 视力枚举类
	public enum VisionScoreEnum {

		FIRST(0, "能看清书报上的标准字体"),
		SECOND(1, "能看清楚大字体,但看不清书报上的标准字体"),
		THIRD(2, "视力有限,看不清报纸大标题,但能辨认物体"),
		FORTH(3, "辨认物体有困难,但眼睛能跟随物体移动,只能看到光、颜色和形状"),
		FIFTH(4, "没有视力,眼睛不能跟随物体移动");
		private int value;
		private String label;

		private VisionScoreEnum(int value, String label) {
			this.value = value;
			this.label = label;
		}

		public static String valueOf(Integer value) {
			if (value == null) {
				return null;
			}
			PerceptionCommunicationEvaluation.VisionScoreEnum[] values = PerceptionCommunicationEvaluation.VisionScoreEnum.values();
			for (PerceptionCommunicationEvaluation.VisionScoreEnum loop : values) {
				if (value == loop.getValue()) {
					return loop.getLabel();
				}
			}
			return null;
		}

		public Integer getValue() {
			return value;
		}

		public String getLabel() {
			return label;
		}
	}

	// 听力枚举类
	public enum HearingScoreEnum {

		FIRST(0, "可正常交谈,能听到电视、电话、门铃的声音"),
		SECOND(1, "在轻声说话或说话距离超过2米时听不清"),
		THIRD(2, "正常交流有些困难,需在安静的环静或大声说话才能听到"),
		FORTH(3, "讲话者大声说话或说话很慢,才能部分听见"),
		FIFTH(4, "完全听不见");
		private int value;
		private String label;

		private HearingScoreEnum(int value, String label) {
			this.value = value;
			this.label = label;
		}

		public static String valueOf(Integer value) {
			if (value == null) {
				return null;
			}
			PerceptionCommunicationEvaluation.HearingScoreEnum[] values = PerceptionCommunicationEvaluation.HearingScoreEnum.values();
			for (PerceptionCommunicationEvaluation.HearingScoreEnum loop : values) {
				if (value == loop.getValue()) {
					return loop.getLabel();
				}
			}
			return null;
		}

		public Integer getValue() {
			return value;
		}

		public String getLabel() {
			return label;
		}
	}

	// 沟通交流枚举类
	public enum CommunicationScoreEnum {

		FIRST(0, "无困难,能与他人正常沟通和交流"),
		SECOND(1, "能够表达自己的需要及理解别人的话,但需要增加时间或给予帮助"),
		THIRD(2, "表达需要或理解有困难,需频繁重复或简化口头表达"),
		FORTH(3, "不能表达需要或理解他人的话");
		private int value;
		private String label;

		private CommunicationScoreEnum(int value, String label) {
			this.value = value;
			this.label = label;
		}

		public static String valueOf(Integer value) {
			if (value == null) {
				return null;
			}
			PerceptionCommunicationEvaluation.CommunicationScoreEnum[] values = PerceptionCommunicationEvaluation.CommunicationScoreEnum.values();
			for (PerceptionCommunicationEvaluation.CommunicationScoreEnum loop : values) {
				if (value == loop.getValue()) {
					return loop.getLabel();
				}
			}
			return null;
		}

		public Integer getValue() {
			return value;
		}

		public String getLabel() {
			return label;
		}
	}


	// 感知觉与沟通分级枚举类
	public enum CommunicationLevelEnum {

		FIRST(0, "能力完好"),
		SECOND(1, "轻度受损"),
		THIRD(2, "中度受损"),
		FORTH(3, "重度受损");
		private int value;
		private String label;

		private CommunicationLevelEnum(int value, String label) {
			this.value = value;
			this.label = label;
		}

		public static String valueOf(Integer value) {
			if (value == null) {
				return null;
			}
			PerceptionCommunicationEvaluation.CommunicationLevelEnum[] values = PerceptionCommunicationEvaluation.CommunicationLevelEnum.values();
			for (PerceptionCommunicationEvaluation.CommunicationLevelEnum loop : values) {
				if (value == loop.getValue()) {
					return loop.getLabel();
				}
			}
			return null;
		}

		public Integer getValue() {
			return value;
		}

		public String getLabel() {
			return label;
		}
	}

}